﻿<%@ Page Title="View Guide Page" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master"
    CodeBehind="ViewGuide.aspx.vb" Inherits="BeachesInGreeceComplete.ViewGuide" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2 id="myHeading" runat="server">
    </h2>
    <asp:ListView ID="ListView1" runat="server" DataKeyNames="ID" DataSourceID="SqlDataSource1">
        <ItemTemplate>
            <li class="hoverClass">
                <asp:Label ID="lbl_Name" CssClass="BeachNameLabel" runat="server" Text='<%# Eval("BeachName") %>' />
                <br />
                <asp:Label ID="lbl_Region" CssClass="RegionLabel" runat="server" Text='<%# Eval("Region") %>' />
                <br />
                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("ID", "BeachDetails.aspx?ID={0}") %>'>
                        <img src='<%# Eval("Thumbnail") %>'  alt="No picture found"  width="100" height="100" style="border-style: solid; border-width: medium" />
                </asp:HyperLink>
                <br />
                <asp:Label ID="lbl_Time" runat="server" Text='<%# CalculateTime.calculateTimeNoHours(Eval("DateAdded")) %>'
                    ForeColor="#009999" />
                <br />
                By •
                <asp:HyperLink ID="HyperLink2" runat="server" Text='<%# Eval("Tourist")%>' NavigateUrl='<%# Eval("Tourist", "Profile.aspx?Tourist={0}") %>'
                    ForeColor="Red" Font-Bold="True" CssClass="red" Font-Size="Smaller">
                    <asp:Label ID="TouristLabel" CssClass="BeachNameLabel" runat="server" Text='<%# Eval("Tourist") %>' />
                </asp:HyperLink><br />
            </li>
        </ItemTemplate>
        <LayoutTemplate>
            <ul class="ItemContainer">
                <li runat="server" id="itemPlaceholder" />
            </ul>
        </LayoutTemplate>
    </asp:ListView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:BeachConnectionString %>"
        ProviderName="<%$ ConnectionStrings:BeachConnectionString.ProviderName %>" SelectCommand="SELECT * FROM [Guides_Beaches] WHERE ([GuideCreator] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="GuideCreator" QueryStringField="GuideCreator" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    <div class="nextLine">
        <asp:DataPager ID="DataPagerBeaches" runat="server" PagedControlID="ListView1" PageSize="12">
            <Fields>
                <asp:NextPreviousPagerField ShowFirstPageButton="True" ShowNextPageButton="False"
                    ButtonType="Link" ButtonCssClass="buttonDataPage" />
                <asp:NumericPagerField ButtonType="Link" />
                <asp:NextPreviousPagerField ShowLastPageButton="True" ShowPreviousPageButton="False"
                    ButtonType="Link" ButtonCssClass="buttonDataPage" />
            </Fields>
        </asp:DataPager>
        <br />
    </div>
    <br />
</asp:Content>
